
import json

json_str = '{"name": "John", "age": 30}'
data = json.loads(json_str)
key_to_check = "name"
if key_to_check in data:
    print(f"Key '{key_to_check}' exists in the JSON.")
else:
    print(f"Key '{key_to_check}' does not exist in the JSON.")